Scenario #1030: Add Operations Contact to Partner

UseCase Add Operations Contact To Partner => Operations-Contact: Dennis Krause for Test AG

Properties

Required

Given

name value
partnerPersonTradeName Test AG
operationsContactFamilyName Krause
operationsContactGivenName Dennis
operationsContactPhoneNumber +49 9932 587741
operationsContactEMailAddress dennis.krause@example.org

Person: Test AG

HTTP GET "/api/hs/office/persons?name=Test+AG" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "00ddd2fc-8742-46e5-924c-77749d4c8ccc", // Person: Test AG
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Test AG",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one.

Person: Dennis Krause

HTTP POST "/api/hs/office/persons" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Krause",
  "givenName" : "Dennis"
}
EOF
=> status: 201 CREATED d1a395c0-c558-438c-ab60-eb5a9ccb204d

Please check first if that person already exists, if so, use it’s UUID below.

HINT: operations contacts are always connected to a partner-person, thus a person which is a holder of a partner-relation.

Contact: Dennis Krause

HTTP POST "/api/hs/office/contacts" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  <<EOF
{
  "caption" : "Dennis Krause",
  "phoneNumbers" : {
    "main" : "+49 9932 587741"
  },
  "emailAddresses" : {
    "main" : "dennis.krause@example.org"
  }
}
EOF
=> status: 201 CREATED 64c932bc-2e34-49ce-8a29-e9ad43fe3f36

Please check first if that contact already exists, if so, use it’s UUID below.

Create Operations-Contact: Dennis Krause for Test AG

HTTP POST "/api/hs/office/relations" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  <<EOF
{
  "type" : "OPERATIONS",
  "anchor.uuid" : "00ddd2fc-8742-46e5-924c-77749d4c8ccc", // Person: Test AG
  "holder.uuid" : "d1a395c0-c558-438c-ab60-eb5a9ccb204d", // Person: Dennis Krause
  "contact.uuid" : "64c932bc-2e34-49ce-8a29-e9ad43fe3f36" // Contact: Dennis Krause
}
EOF
=> status: 201 CREATED a34341bf-7c9c-45b2-8d37-51091d1c0265

Verify the New OPERATIONS Relation

HTTP GET "/api/hs/office/relations?relationType=OPERATIONS&personData=Krause" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "a34341bf-7c9c-45b2-8d37-51091d1c0265",
  "anchor" : {
    "uuid" : "00ddd2fc-8742-46e5-924c-77749d4c8ccc", // Person: Test AG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Test AG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "d1a395c0-c558-438c-ab60-eb5a9ccb204d", // Person: Dennis Krause
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Dennis",
    "familyName" : "Krause"
  },
  "type" : "OPERATIONS",
  "mark" : null,
  "contact" : {
    "uuid" : "64c932bc-2e34-49ce-8a29-e9ad43fe3f36", // Contact: Dennis Krause
    "caption" : "Dennis Krause",
    "postalAddress" : { },
    "emailAddresses" : {
      "main" : "dennis.krause@example.org"
    },
    "phoneNumbers" : {
      "main" : "+49 9932 587741"
    }
  }
} ]

generated on 2026-08-10 01:37:51 for branch